package com.ridu.project.beshid.controller;

import com.ridu.project.beshid.api.GeneralResponse;
import com.ridu.project.beshid.service.CategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by Administrator on 2017/2/13.
 */
@Controller
@RequestMapping(value = "category",produces = "application/json")
@Slf4j
public class CategoryController extends BaseController {

    @Autowired
    private CategoryService service;

    @RequestMapping(value = "getAll")
    @ResponseBody
    public GeneralResponse getAll(){
        return service.findAll();
    }

}

